package com.github.wxiaoqi.security.biz.feign;

import java.util.Map;

import org.dromara.hmily.annotation.Hmily;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.github.wxiaoqi.security.biz.common.crm.request.FreezeRequest;
import com.github.wxiaoqi.security.biz.common.crm.request.IntoAccountRequest;
import com.github.wxiaoqi.security.biz.common.crm.request.OutAccountRequest;
import com.github.wxiaoqi.security.biz.common.crm.request.UnFreezeAndOutAccountRequest;
import com.github.wxiaoqi.security.biz.common.crm.request.UnFreezeRequest;
import com.github.wxiaoqi.security.common.msg.BaseApiResponse;

/**
 * 支付相关接口调用
 * @author he
 *
 */
@FeignClient(value = "flyray-crm-core")
public interface CrmFeign {
	
	/**
	 * 第三方支付入账
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/intoAccount",method = RequestMethod.POST)
	public Map<String, Object> inAccounting(@RequestBody Map<String, Object> params);
	
	/**
	 * 第三方支付入账Tcc
	 * @param intoAccountRequest
	 * @return
	 */
	@Hmily
	@RequestMapping(value = "feign/intoAccountTcc",method = RequestMethod.POST)
	public BaseApiResponse inAccountingTcc(@RequestBody IntoAccountRequest intoAccountRequest);
	
	/**
	 * 余额账户入账
	 * @param intoAccountRequest
	 * @return
	 */
	@Hmily
	@RequestMapping(value = "feign/balAccountInto",method = RequestMethod.POST)
	public BaseApiResponse balAccountInto(@RequestBody IntoAccountRequest intoAccountRequest);
	
	/**
	 * 账户流水
	 * @param intoAccountRequest
	 * @return
	 */
	@Hmily
	@RequestMapping(value = "feign/accountJournal",method = RequestMethod.POST)
	public BaseApiResponse accountJournal(@RequestBody IntoAccountRequest intoAccountRequest);
	
	/**
	 * 創建賬戶
	 * @param intoAccountRequest
	 * @return
	 */
	@Hmily
	@RequestMapping(value = "feign/createAccount",method = RequestMethod.POST)
	public BaseApiResponse createAccount(@RequestBody IntoAccountRequest intoAccountRequest);
	
	/**
	 * 查询账户信息
	 * @param intoAccountRequest
	 * @return
	 */
	@RequestMapping(value = "feign/accountInfoQuery",method = RequestMethod.POST)
	public BaseApiResponse accountInfoQuery(@RequestBody IntoAccountRequest intoAccountRequest);
	
	
	/**
	 * 第三方退款出账
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/outAccount",method = RequestMethod.POST)
	public Map<String, Object> outAccounting(@RequestBody Map<String, Object> params);
	
//	/**
//	 * 第三方退款出账Tcc
//	 * @param req
//	 * @return
//	 */
//	@RequestMapping(value = "feign/outAccountTcc",method = RequestMethod.POST)
//	@Hmily
//	public BaseApiResponse outAccountingTcc(@RequestBody OutAccountRequest outAccountRequest);
	
	/**
	 * 个人或商户解冻流水
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/unFreAndOutJournalTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse unFreAndOutJournalTcc(@RequestBody UnFreezeAndOutAccountRequest unFreAndOutAccountRequest);
	
	
	/**
	 * 记录商户账户流水
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/insertMerActJournalTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse insertMerActJournalTcc(@RequestBody OutAccountRequest outAccountRequest);
	
	/**
	 * 记录个人账户流水
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/insertPerActJournalTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse insertPerActJournalTcc(@RequestBody UnFreezeAndOutAccountRequest unFreAndOutAccountRequest);
	
	/**
	 * 校验冻结流水是否被解冻
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/verificationFreeze",method = RequestMethod.POST)
	public BaseApiResponse verificationFreeze(@RequestBody  UnFreezeAndOutAccountRequest unFreAndOutAccountRequest);
	
	
	/**
	 * 转账
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/accounttransfer",method = RequestMethod.POST)
	public Map<String, Object> accounttransfer(@RequestBody Map<String, Object> params);
	
	/**
	 * 余额退款出账
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/payment/balanceRefund",method = RequestMethod.POST)
	public Map<String, Object> balanceRefund(@RequestBody Map<String, Object> params);
	
	/**
	 * 账户余额冻结
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/freeze",method = RequestMethod.POST)
	public Map<String, Object> freeze(@RequestBody Map<String, Object> params);	
	/**
	 * 账户余额解冻
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/unfreeze",method = RequestMethod.POST)
	public Map<String, Object> unfreeze(@RequestBody Map<String, Object> params);

	/**
	 * 账户余额冻结
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/freezeTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse freezeTcc(@RequestBody FreezeRequest freezeRequest);
	
	/**
	 * 账户余额冻结流水
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/freezeJournalTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse freezeJournalTcc(@RequestBody FreezeRequest freezeRequest);
	
	/**
	 * 校验冻结流水是否被解冻
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/verificationFreezeId",method = RequestMethod.POST)
	public BaseApiResponse verificationFreezeId(@RequestBody UnFreezeRequest unFreezeRequest);
	
	/**
	 * 账户余额解冻
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/unfreezeTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse unfreezeTcc(@RequestBody UnFreezeRequest unFreezeRequest);
	
	/**
	 * 账户余额解冻流水
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/unfreezeJournalTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse unfreezeJournalTcc(@RequestBody UnFreezeRequest unFreezeRequest);
	/**
	 * 账户余额解冻并出账
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/unFreAndOutAccount",method = RequestMethod.POST)
	public Map<String, Object> unFreAndOutAccount(@RequestBody Map<String, Object> params);
	
	/**
	 * 账户余额解冻并出账Tcc
	 * @param req
	 * @return
	 */
	@RequestMapping(value = "feign/unFreAndOutAccountTcc",method = RequestMethod.POST)
	@Hmily
	public BaseApiResponse unFreAndOutAccountTcc(@RequestBody UnFreezeAndOutAccountRequest unFreAndOutAccountRequest);
	/***
	 * 
	 * 用户基础信息校验
	 */
	
	 @RequestMapping(value = "feign/personal/queryInfo", method =RequestMethod.POST) 
	 public Map<String, Object> queryPersonalInfo(@RequestBody Map<String, Object> params);

	/***
	 * 
	 * 商户信息查询
	 */
	@RequestMapping(value = "feign/merchant/queryInfo", method = RequestMethod.POST)
	public Map<String, Object> queryMerchantInfo(@RequestBody Map<String, Object> params);
	
	/***
	 * 
	 * 账户信息查询
	 */
	@RequestMapping(value = "feign/accountQuery", method = RequestMethod.POST)
	public Map<String, Object> accountQuery(@RequestBody Map<String, Object> params);
	/***
	 * 
	 * 账户流水信息查询
	 */
	@RequestMapping(value = "feign/accountJournalQuery", method = RequestMethod.POST)
	public Map<String, Object> accountJournalQuery(@RequestBody Map<String, Object> params);
	
	/**
	* 查询商户通道费率
	* @param req
	* @return
	*/
	@RequestMapping(value = "feign/payChannelConfig/queryMerChannelFee",method = RequestMethod.POST)
	public Map<String, Object> queryMerChannelFee(@RequestBody Map<String, Object> params);
	/***
	 * 
	 * 校验交易密码
	 */
	@RequestMapping(value = "feign/customer/verifyPayPassword", method = RequestMethod.POST)
	public Map<String, Object> verifyPayPassword(@RequestBody Map<String, Object> params);
	/***
	 * 
	 * 查询平台回调配置信息
	 */
	@RequestMapping(value = "feign/callbackUrl/queryInfo", method = RequestMethod.POST)
	public Map<String, Object> queryCallbackUrlInfo(@RequestBody Map<String, Object> params);
}
